import {Component, Input, OnInit} from '@angular/core';
import {ModalController} from '@ionic/angular';

@Component({
    selector: 'app-preview-img',
    templateUrl: './preview-img.component.html',
    // styleUrls: ['./preview-img.component.less'],
})
export class PreviewImgComponent implements OnInit {
    @Input() imgUrl: any; // 图片的完整路径

    constructor(
        public modalController: ModalController,
    ) {
    }

    ngOnInit() {
    }

    // 返回上一层（关闭当前model）
    back() {
        this.modalController.dismiss({
            'dismissed': true
        });
    }

}
